import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/pvm/government/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/pvm/government',
    method: 'post',
    headers: { 'content-type': 'application/json' },
    data: obj

  })
}

export function getObj(id) {
  return request({
    url: '/pvm/government/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/pvm/government/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/pvm/government',
    method: 'put',
    data: obj
  })
}


export function getByGovernmentName(governmentName) {
  return request({
    url: '/pvm/government/governmentName/'+governmentName,
    method: 'get',
  })
}

export function getGovernmentList() {
  return request({
    url: '/pvm/government/getGovernmentList',
    method: 'get',
  })
}
